package Ventanas;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import java.awt.GridLayout;

import javax.swing.JButton;

import org.jvnet.substance.SubstanceLookAndFeel;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

import javax.swing.ImageIcon;

public class ventanaEstilos extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					ventanaEstilos frame = new ventanaEstilos();
					frame.setVisible(true);
					frame.setSize(683, 720);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public ventanaEstilos() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 852, 484);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		getContentPane().setLayout(new GridLayout(3,2,5,5));
		setTitle("Elige tu estilo: ");
		
		
		JButton estilo1 = new JButton();
		estilo1.setIcon(new ImageIcon(ventanaEstilos.class.getResource("/Fotos/estilos/1.png")));
		estilo1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				JOptionPane.showMessageDialog(null, "Tema por defecto");
				setVisible(false);	
			}
		});
		JButton estilo2 = new JButton();
		estilo2.setIcon(new ImageIcon(ventanaEstilos.class.getResource("/Fotos/estilos/2.png")));
		estilo2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFrame.setDefaultLookAndFeelDecorated(true);
				SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.BusinessBlueSteelSkin");
				JOptionPane.showMessageDialog(null, "Tema elegido: Blue Steel");
				setVisible(false);
			}
		});
		JButton estilo3 = new JButton();
		estilo3.setIcon(new ImageIcon(ventanaEstilos.class.getResource("/Fotos/estilos/3.png")));
		estilo3.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFrame.setDefaultLookAndFeelDecorated(true);
				SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.CremeSkin");
				JOptionPane.showMessageDialog(null, "Tema elegido: Creme");
				setVisible(false);
			}
		});
		JButton estilo4 = new JButton();
		estilo4.setIcon(new ImageIcon(ventanaEstilos.class.getResource("/Fotos/estilos/4.png")));
		estilo4.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFrame.setDefaultLookAndFeelDecorated(true);
				SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.NebulaSkin");
				JOptionPane.showMessageDialog(null, "Tema elegido: Nebula");
				setVisible(false);
				
			}
		});
		JButton estilo5 = new JButton();
		estilo5.setIcon(new ImageIcon(ventanaEstilos.class.getResource("/Fotos/estilos/5.png")));
		estilo5.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JFrame.setDefaultLookAndFeelDecorated(true);
				SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.MistAquaSkin");
				JOptionPane.showMessageDialog(null, "Tema elegido: Mist Aqua");
				setVisible(false);
			}
		});
		JLabel texto = new JLabel("");
		texto.setIcon(new ImageIcon(ventanaEstilos.class.getResource("/Fotos/estilos/elige.png")));
		
		getContentPane().add(estilo1);	
		getContentPane().add(estilo2);	
		getContentPane().add(estilo3);	
		getContentPane().add(estilo4);	
		getContentPane().add(estilo5);
		getContentPane().add(texto);
		
		
		
	}
}
